<%@ page language="java" contentType="text/html; charset=UTF-8"
	trimDirectiveWhitespaces="true" pageEncoding="UTF-8"%>	
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%
	String path = request.getContextPath();
%>

<t:genericpage nav="${nav}">

    <jsp:attribute name="jsblock">
    
    <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.5&key=c5d1c95a4c0a9b98a8be147b7c557028"></script>
    <script type="text/javascript">
						
		var map = new AMap.Map('container',{
		    resizeEnable: true,
		    mapStyle:'amap://styles/grey',
		    zoom: 8
		});	
		    //绘制初始路径
	    var path = [];
	    path.push([116.303843, 39.983412]);
	    path.push([116.321354, 39.896436]);
	    path.push([116.407012, 39.992093]);
	    map.plugin("AMap.DragRoute", function() {
	        route = new AMap.DragRoute(map, path, AMap.DrivingPolicy.LEAST_FEE); //构造拖拽导航类
	        route.search(); //查询导航路径并开启拖拽导航
	    });	
		//http://lbs.amap.com/api/javascript-api/guide/create-map/mapstye/		
		//map.setMapStyle('amap://styles/grey');
    </script>
    
    </jsp:attribute>
        
    <jsp:body>
		<div id="container" tabindex="0" style="height: 500px;"></div>
    </jsp:body>    
</t:genericpage>